package com.dwxt.cdms.dao;

import com.dwxt.cdms.entity.Customer;
import com.dwxt.cdms.entity.CustomerExample;
import com.dwxt.cdms.entity.vo.CustomerVO;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface CustomerMapper {
    long countByExample(CustomerExample example);

    int deleteByExample(CustomerExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Customer record);

    int insertSelective(Customer record);

    List<Customer> selectByExample(CustomerExample example);

    List<Customer> selectCustomerList(Map map);

    List<Customer> selectCommunityCustomerList(Customer customer);

    Customer selectByPrimaryKey(Integer id);

    Customer selectByPhone(String phone);

    int updateByExampleSelective(@Param("record") Customer record, @Param("example") CustomerExample example);

    int updateByExample(@Param("record") Customer record, @Param("example") CustomerExample example);

    int updateByPrimaryKeySelective(Customer record);

    int updateByPrimaryKey(Customer record);

    int deleteCustomerByIds(@Param("ids")Integer[] ids);

    List<Customer> selectWatchCustomer(Customer customer);

    List<Map<String,Object>> selectCountByCustomerId(@Param("id") Integer id);

    List<Map> selectCustomerRelationPeople(@Param("customerId")Integer customerId);

    List<Map> selectCustomerIndexRelationPeople(@Param("customerId")Integer customerId);

    int privacy(Integer customerId,String sign);

    List<Customer> selectByBirthday(@Param("birthday")String birthday);

    List<CustomerVO> select72HourNoDataCustomer();


    int updateSign(Integer customerId, String signImage, Date signTime, String sign);
}